﻿
@{
    ViewData["Title"] = "Index";
    Layout = "~/Views/Shared/MyMasterPage.cshtml";
}

    <div id="content">
        <div v-for="item in dataList">
            <!-- banner-area -->
            <section class="banner-section">
                <div class="section-bg" style="background-image: url('assets/img/parallax.jpg');"></div>
                <div class="container">
                    <div class="row">
                        <div class="page-banner-content col">
                            <h1 class="text-white">{{item.NewsTitle}}</h1>
                            <span>{{item.NewsAuthor}}</span>

                            <!-- breadctumb -->
                            <ul class="page-breadcrumb">
                                <li><a href="/">首页</a></li>
                                <li>{{item.NewsTitle}}</li>
                            </ul>
                        </div>
                    </div>
                </div>
            </section>
            <!-- about-area -->
            <section class="white-section section-block">
                <div class="container">
                    <div class="section-space"></div>
                    <div class="row">
                        <div class="col-lg-9 col-md-12">
                            <div class="content-area">
                                <p v-html="item.NewsContent"></p>
                            </div>
                        </div>
                        <div class="col-lg-3 col-md-6 col-sm-6 col-6 wow fadeInRight animated" data-wow-duration=".5s" data-wow-delay=".3s">
                            <div class="about-img">
                                <img :src="item.ThumbImage" class="img-fluid" alt="">
                            </div>
                        </div>
                       
                    </div>
                    <div class="section-space"></div>
                </div>
            </section>

            <!-- counter-area -->
            

            <!-- testimonials-area -->
            

            <!-- brands-area -->
            <div class="white-section section-block">

                <div class="section-space"></div>
                <div class="container">
                    <div class="row">
                        <div class="col-md-12">
                            <div class="partners" data-auto="false" data-loop="false" data-column="5" data-column2="3" data-column3="2" data-gap="60">
                                <div class="owl-carousel owl-theme">

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-1.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-2.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-3.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-4.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-5.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-6.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-7.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                    <div class="partner-item clearfix">
                                        <div class="inner">
                                            <a target="_blank" href="#">
                                                <div class="thumb">
                                                    <img src="assets/img/partner/logo-8.png" alt="Image">
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="section-space"></div>

            </div>
        </div>
    </div>
    <script type="text/javascript">
    var vm = new Vue({
        el: "#content",
        data: {
            dataList: [],
            NewsType: '', //类型
           

        },
        mounted() {
            this.getReq();//渲染之前
            this.getList();//获取数据

        },

        methods: {
            //获取News内容
            getList() {
                var that = this
                $.ajax({
                    type: 'GET',
                    url: '/api/Content/GetPageListJson?pageSize=1&pageIndex=1&NewsType=' + this.NewsType,
                    data: {},
                    success: function (res) {
                        that.dataList = res.Result,
                            that.all = res.TotalCount,
                          
                        vm.$forceUpdate();
                        console.log(that.dataList)
                     
                    }
                });
            },
            //获取url参数
            getReq() {
                var Requset = new Object;
                Requset = GetRequest();
                this.NewsType = Requset["ContentType"]
               
                if (this.NewsType == undefined) {
                    this.NewsType = ''
                }
                if (this.pageIndex == undefined) {
                    this.pageIndex = 1
                }
                console.log(this.NewsType)
            },
            
        },
        created() {

        },
    })
    </script>
